package com.heima.client.wemedia;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.common.pojos.wemedia.WmUser;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.common.pojos.wemedia.WmSensitive;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("leadnews-wemedia")
public interface IWemediaClient {

    @GetMapping("/api/v1/channel/channels")
    ResponseResult channels();

  /*  *//**  因为直接写在了WmChannelServiceImpl类中 无需远程调用
     * 添加频道
     *//*
    @PostMapping("/api/v1/channel/save")
    ResponseResult save(@RequestBody AdChannelDto adChannelDto);

    *//**
     * 分页查询频道列表
     *//*
    @PostMapping("/api/v1/channel/list")
    ResponseResult list(@RequestBody AdChannelDto adChannelDto);

    *//**
     * 删除频道
     *//*
    @GetMapping("/api/v1/channel/del/{id}")
    ResponseResult delChannel(@PathVariable("id") Integer id);

    *//**
     * 修改频道
     *//*
    @PostMapping("/api/v1/channel/update")
    ResponseResult update(@RequestBody AdChannelDto adChannelDto);

    */

    /**
     * 查询频道列表
     */
    @GetMapping("/api/v1/channel/list")
    public ResponseResult listChannels();

   /*
        //因为重复 注释掉一个
     @GetMapping("/api/v1/channel/channelsWemedia")
     ResponseResult channels();*/

    @GetMapping("/api/v1/baidu/scantext")
    public ResponseResult scanText(@RequestParam String text);

    @GetMapping("/api/v1/sensitive/autoscan")
    public List<WmSensitive> autoScan();

    /**
     * 用户认证审核
     * @param wmUser
     * @return
     */
    @PostMapping("/api/v1/user/addWemediaUser")
    ResponseResult insertUser(@RequestBody WmUser wmUser);


}
